﻿namespace tool
{
    public class Timer
    {
        private float interval;
        private float total;
        public Timer(float interval)
        {
            this.interval = interval;
        }

        public void AddTime(float deltaTime)
        {
            total += deltaTime;
        }

        public bool CheckTimeUp()
        {
            if (total > interval)
            {
                total = 0;
                return true;
            }
            else
            {
                return false;
            }
        }

    }
}